import lombok.Data;

/**
 * @ClassName LC303
 * @Author ykx
 * @Date 2024/3/18 16:19
 * @Version 1.0
 */
@Data
public class LC303 {

    private int[] nums;

    public LC303(int[] nums) {

    }

    public int sumRange(int left, int right) {
        int sum = 0;
        for (int i = left; i <= right; i++) {
            sum += nums[i];
        }
        return sum;
    }
}
